<template>
  <div>
    <Header />
    <nuxt />
    <Footer />
    <!-- <el-backtop v-if="backtop" target=".wraper"></el-backtop> -->
  </div>
</template>

<script>
import Header from '@/components/public/header/index'
import Footer from '@/components/public/footer/index'
export default {
  name: 'DefaultLayout',
  components: { Header, Footer },
  data() {
    return {
      backtopArray: [new RegExp('^/$'), new RegExp('^/class')]
    }
  },
  computed: {
    backtop() {
      const path = this.$route.path
      const reg = this.backtopArray
      for (let i = 0, len = reg.length; i < len; i++) {
        if (reg[i].test(path)) {
          return true
        }
      }
      return false
    }
  }
}
</script>
<style lang="scss" scoped>
div {
  background-color: #f0f0f0;
}
.wraper {
  height: 100vh;
  overflow-x: hidden;
}
</style>
